# encoding=utf-8

def test_operation():
    # 1.基本运算
    # 幂运算
    a = 3 ** 2
    print(a)

    # 除
    b = 5 / 3
    print(b)

    # 整除
    c = 5 // 3
    print(c)

    # 取余
    d = 5 % 3
    print(d)

    # 2.字符串与数字的乘法
    e = "nice "
    print(e * 4)

    f = ["a", 2]
    print(f * 2)

    g = ("long", "hao a")
    print(g * 3)

    # h = {"key": "clod"}
    # print(h * 2)


"""
比较运算符
"""


def test_compare():
    # is 判断两个对象存储单元是否相同 == 判断是否相等
    # python会对 0-255 数字进行缓存，在Terminal python中超过这个数 使用  is比较两个数字是False的

    a = "nihao"
    b = "nihao"
    print("a地址", id(a))
    print("b地址", id(b))
    print("a==b ", a == b)

    print("a is b ", a is b)


if __name__ == '__main__':
    # test_operation()
    test_compare()
